#pragma once

#include "ITimeLine.h"
#include "ITask.h"

class CTimeLine : public ITimeLine
{
public:
	        CTimeLine();
			CTimeLine(std::string name);
	virtual ~CTimeLine();

public:
	// Attributes
	virtual void        setName(std::string name);
	virtual std::string getName() const;

	// Chain list
	virtual ITimeLine*  find(std::string name);
    virtual ITimeLine*  find(int index);
	virtual int         add(ITimeLine* newTL);
	virtual int         remove(ITimeLine* tl);
    virtual void        setNext(ITimeLine* plan);
    virtual void        setPre(ITimeLine* plan);
    virtual ITimeLine*  getNext() const;
    virtual ITimeLine*  getPre() const;
    
    
    virtual int         addTask(ITask* newTask);
    virtual int         removeTask(ITask* task);
	virtual ITask*      getTask() const;
    
	virtual bool        operator==(ITimeLine& t);

private:
	ITask* m_pFirstTask;
	std::string m_strName;
	ITimeLine*  m_pNextTimeLine;
	ITimeLine*  m_pPreTimeLine;
};
